Skip to content

docs(unity): Describe how screenshots get attached to events - #19972

Draft
bitsandfoxes wants to merge 3 commits into
masterfrom
fix/unity-screenshots
Draft

bitsandfoxes wants to merge 3 commits into
masterfrom
fix/unity-screenshots

Conversation

@bitsandfoxes

@bitsandfoxes bitsandfoxes commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Updates the Unity screenshot docs for getsentry/sentry-unity#2835.

The SDK used to send screenshots separately from their event, after the fact, and encoded them on the main thread. It now takes the screenshot at the end of the frame the error happened in, attaches it to the event in the same envelope, and, where supported, reads it back and compresses it off the main thread.

  • Explain the C# screenshot mechanism: end-of-frame capture, a screenshot shared by events captured while it's being taken, background-thread events, no screenshot for events dropped by BeforeSend or sampling, and that the screenshot gets dropped along with its event.
  • Document SetBeforeSendScreenshot, as it was undocumented: it runs once per screenshot, and it keeps capture and compression on the main thread.
  • Note that SetBeforeCaptureScreenshot can run on a background thread.

Should be merged together with the SDK release containing getsentry/sentry-unity#2835.

🤖 Generated with Claude Code

The Unity SDK now attaches a periodically captured screenshot to the
event itself instead of capturing at end of frame and sending it
separately. Document the new ScreenshotCaptureInterval option, the
SetBeforeSendScreenshot callback and which threads the callbacks run on.

Refs getsentry/sentry-unity#2835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Oct 23, 2026 8:06pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Oct 23, 2026 8:06pm UTC

Request Review

The Unity SDK now takes the screenshot at the end of the frame the error
happened in instead of periodically. Drop ScreenshotCaptureInterval,
document SetBeforeSendScreenshotPixels and the Low default quality, and
mark SetBeforeSendScreenshot as deprecated.

Refs getsentry/sentry-unity#2835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — a5293053 Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Needs Triage The PR description is missing valid priority information

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant